Compare Two Milestones Dates  

By Hubert Ronald / Leave a response / May 28, 2018

Here two dates are compared and the date, which occurs first, is displayed.

This snippet was orginally taken from C# Program to Campare Two Dates

using System;
namespace DateAndTime
{
    class milestoneProgram
    {
        static int Main()
        {
            DateTime d1 = new DateTime(2018, 05, 27);
            DateTime d2 = d1.AddDays(-10);

            if (d1 < d2){
                Console.WriteLine("Starting Date : {0}", d1);
                Console.WriteLine("Ending Date   : {0}", d2);
                }
            else {
                Console.WriteLine("Starting Date : {0}", d2);
                Console.WriteLine("Ending Date   : {0}", d1);
            };
            Console.Read();
            return 0;
    
        }
    }
}

Here is the output of the C# milestoneProgram:

/*
Starting Date : 05/17/2018 00:00:00
Ending Date   : 05/27/2018 00:00:00
*/





Hubert Ronald

Hiya. I'm Ronald, an Industrial Engineer from Colombia. Hope you enjoyed my ad-free, bullshit-free site. If you liked it, tell someone about it.

Write a response

Your email address will not be published.

RECENT NEWS

Gradient is a small library which offers a clean, minimalistic but powerful API for gradients on mesh canvas when you use it on Gideros Mobile. This script take colors from uiGradients like inspiration.

More information about before here.

SUBSCRIBE

Get monthly updates and free resources.


CONNECT WITH ME